:: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
::  NOTE: RIGHT CLICK AND RUN AS ADMINISTRATOR!!                
::  Auto Install and Activate Custom Theme For Windows 8 
::  DosProbie ö¿ö - rev. 04.25.13                                 
:: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

@Echo Off&color a && cls && Mode 62,14&title,  [ HAWAIIAN SCAPES THEME ]
%~d0
cd %~d0%~p0
set vbs=%tmp%\Theme_Fini.vbs
set cpy=xcopy /cqhysei
set del=del /q/f

echo Installing Custom Theme for Windows 8..
::== COPY ==
%cpy% "%~dp0Hawaii" "%windir%\resources\themes\Hawaii\">nul
%cpy% "%~dp0HawaiianScapes.theme" "%windir%\resources\themes\">nul
::== INSTALL ==
::Set Path to Theme Directory
Set TargetDir="C:\Windows\Resources\Themes"
pushD "%~dp0" & cd /d "%~dp0"
::Activate Theme
cd /d %TargetDir%
start "" HawaiianScapes.theme
popD
::== DONE ==
cls
echo ** DONE **
::Sound Scheme
If exist "%tmp%\~import.reg" (
 Attrib -R -S -H "%temp%\~import.reg"
 del /F /Q "%tmp%\~import.reg"
 If exist "%tmp%\~import.reg" (
  Echo Could not delete file "%tmp%\~import.reg"
  pause
 )
)
> "%tmp%\~import.reg" Echo Windows Registry Editor Version 5.00
>> "%tmp%\~import.reg" Echo.
>> "%tmp%\~import.reg" Echo ;RECYCLE BIN NOTIFICATION SCHEME
>> "%tmp%\~import.reg" Echo [HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin]
>> "%tmp%\~import.reg" Echo.
>> "%tmp%\~import.reg" Echo [HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin\.Current]
>> "%tmp%\~import.reg" Echo @="C:\\Windows\\Resources\\Themes\\hawaii\\s_recycle_splash.wav"
>> "%tmp%\~import.reg" Echo.
>> "%tmp%\~import.reg" Echo [HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin\Custom]
>> "%tmp%\~import.reg" Echo @="C:\\Windows\\Resources\\Themes\\hawaii\\s_recycle_splash.wav"
>> "%tmp%\~import.reg" Echo ;CUSTOM ICON FIX
>> "%tmp%\~import.reg" Echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon]
>> "%tmp%\~import.reg" Echo "empty"="C:\\Windows\\Resources\\Themes\\hawaii\\basket-empty.ico,0"
>> "%tmp%\~import.reg" Echo "full"="C:\\Windows\\Resources\\Themes\\hawaii\\basket-full.ico,0"
>> "%tmp%\~import.reg" Echo @="C:\\Windows\\Resources\\Themes\\hawaii\\basket-full.ico,0"
>> "%tmp%\~import.reg" Echo ;ENABLE THEME DESKTOP ICONS
>> "%tmp%\~import.reg" Echo ;User
>> "%tmp%\~import.reg" Echo [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu]
>> "%tmp%\~import.reg" Echo "{59031a47-3f72-44a7-89c5-5595fe6b30ee}"=dword:00000000
>> "%tmp%\~import.reg" Echo ;Computer
>> "%tmp%\~import.reg" Echo [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu]
>> "%tmp%\~import.reg" Echo "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"=dword:00000000
>> "%tmp%\~import.reg" Echo ;Network
>> "%tmp%\~import.reg" Echo [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu]
>> "%tmp%\~import.reg" Echo "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}"=dword:0000000
>> "%tmp%\~import.reg" Echo ;Recycle Bin
>> "%tmp%\~import.reg" Echo [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu]
>> "%tmp%\~import.reg" Echo "{645FF040-5081-101B-9F08-00AA002F954E}"=dword:00000000
start /wait regedit /s "%tmp%\~import.reg"
%del% "%tmp%\~import.reg"
::Audio Notification
::Create Script
>> %vbs% Echo CreateObject("SAPI.SpVoice").Speak "Your Hawaiian Scapes Theme has installed successfully!" 
::Launch Script
start "" %vbs%
ping -n 4 127.0.0.1>nul
cls
::Delete Script
%del% "%tmp%\Theme_Fini.vbs">nul
::cscript //nologo "%~dp0Theme_Fini.vbs"
::Refresh Desktop Icons
ping -n 2 127.0.0.1>nul
taskkill /f /im explorer.exe>nul 
start explorer.exe>nul
::Logoff to Finalize Changes
shutdown.exe -L
